/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package param

import "did-service/bean/model"

// ApplyCredentialParam 申请凭证的请求参数
type ApplyCredentialParam struct {
	IssuerId          string                  `json:"issuerId" validate:"required"`
	CptId             string                  `json:"cptId" validate:"required"`
	Type              string                  `json:"cptType" validate:"required,eq=00" errorInfo:"凭证类型不支持"`
	CredentialSubject model.CredentialSubject `json:"credentialSubject"`
}

// RevokeCredentialParam 申请凭证的请求参数
type RevokeCredentialParam struct {
	CredentialId string `json:"credentialId" validate:"required"`
	RevokeReason string `json:"revokeReason" validate:"required"`
}

// ListCredentialParam 凭证列表的请求参数
type ListCredentialParam struct {
	PageNum        string `json:"pageNum"`
	PageSize       string `json:"pageSize"`
	IssuerName     string `json:"issuerName"`
	CredentialName string `json:"credentialName"`
}

type ListGrantCredentialParam struct {
	PageNum        string `json:"pageNum"`
	PageSize       string `json:"pageSize"`
	IssuerName     string `json:"issuerName"`
	CredentialName string `json:"credentialName"`
	WalletId       string `json:"walletId"`
}

type GetCredentialByDidParam struct {
	Did   string `json:"did"`
	CptId string `json:"cptId"`
}
